<template>
  <div >
    <div class="box" v-for="(item,index) in list" :key="index" :class="{ chose: item.isChose }" @click="isChose(item)">
      <div class="box-top">
        <div class="label">
          {{ item.label }}
        </div>
        <div class="text">
          {{ item.text }}
        </div>
      </div>
      <div class="box-bottom">
        <div class="label l1">
          {{ item.label1 }}
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  props: {
    list: {
      type: Array,
      default: () => {
        return []
      },
    },
  },
  computed: {},
  components: {},
  methods: {
    isChose(item) {
        this.list.map(i=>{
            i.isChose = false
        })
        item.isChose = true
        this.list.splice()
        this.$emit('chose',item)
    },
  },
};
</script>
<style lang="scss" scoped>
.box {
  padding: 10px;
  background: #ffffff;
  border-radius: 4px 4px 4px 4px;
  margin-bottom: 10px;
  &.chose {
    background: #e6f0ff;
    border-radius: 4px 4px 4px 4px;
    opacity: 1;
    border: 1px solid #95bdf8;
  }
  .box-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    .label {
      font-size: 16px;
      font-family: Source Han Sans CN-Bold, Source Han Sans CN;
      font-weight: bold;
      color: #333333;
    }
    .text {
      font-size: 14px;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      font-weight: 400;
      color: #548af1;
    }
  }
  .box-bottom {
    .label {
      font-size: 13px;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      font-weight: 400;
      color: #333333;
    }
  }
}
</style>